<!--
 * @Author: 亚亚
-->
<!--
 * @Author: 亚亚
-->
<!--
 * @Author: 亚亚
-->
<template>
  <el-tree-select
    v-model="currentVal"
    v-bind="$attrs"
    :style="props.style"
    :props="props.props"
  />
</template>

<script lang="ts" setup>
import { props as treeSelectProps } from './index'
const props = defineProps(treeSelectProps)
const emit = defineEmits(['update:modelValue'])
const currentVal = ref(props.modelValue)

//监听父组件的值
watch(() => props.modelValue, () => {
  currentVal.value = props.modelValue
})
// 通过emit将值传递给父组件
emit("update:modelValue", currentVal)
</script>